package com.ucvisitorsapp.dao;

import android.app.Activity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;


public class BuildingDatabase extends Activity {

	public void onCreate(){
	SQLiteDatabase db = openOrCreateDatabase("bulidingDB", MODE_PRIVATE, null);
	db.execSQL("CREATE TABLE IF NOT EXISTS Buildings (Name TEXT, Location TEXT);");
	db.execSQL("INSERT INTO Buildings VALUES('Lindner', 'somecoords');");
	
	/**create cursor
	Cursor c = db.rawQuery("SELECT * from Buildings", null);
	
	//move cursor to start of results
	c.moveToFirst();
	
	Log.d("results", c.getString(c.getColumnIndex("Name")));
	**/
	db.close();
	}
}
